// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addInterfaceParam POST /api/interfaceParam/add */
export async function addInterfaceParamUsingPost(
  body: API.InterfaceParamAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/interfaceParam/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteInterfaceParam POST /api/interfaceParam/delete */
export async function deleteInterfaceParamUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/interfaceParam/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getInterfaceParamById GET /api/interfaceParam/get */
export async function getInterfaceParamByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getInterfaceParamByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseInterfaceParam_>('/api/interfaceParam/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listInterfaceParamByPage POST /api/interfaceParam/list/page */
export async function listInterfaceParamByPageUsingPost(
  body: API.InterfaceParamQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageInterfaceParamVo_>('/api/interfaceParam/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listInterfaceParamWithTree GET /api/interfaceParam/list/tree */
export async function listInterfaceParamWithTreeUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listInterfaceParamWithTreeUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListInterfaceParamVo_>('/api/interfaceParam/list/tree', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** updateInterfaceParam POST /api/interfaceParam/update */
export async function updateInterfaceParamUsingPost(
  body: API.InterfaceParamUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/interfaceParam/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
